from PIL import ImageGrab
import os
import time

time.sleep(5)
os.chdir(r'C:\Users\***\Desktop')

while True:
    image = ImageGrab.grab()
    image.save("screen_" + str(round(time.time())) + '.png')
    time.sleep(3)


# while True:
#     image = ImageGrab.grabclipboard()
#     strimage = str(image)[:60]
#     while True:
#         image2 = ImageGrab.grabclipboard()
#         strimage2 = str(image2)[:60]
#         time.sleep(0.5)
#         if strimage2 != strimage and image2 is not None:
#             image2.save("screen_"+str(round(time.time()))+'.png')
#             break
